package com.zboin.controller;

import com.zboin.common.domain.AjaxResult;
import com.zboin.domain.UserInfo;
import com.zboin.service.UserService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhboom
 * @date 2025/6/8 21:33
 */
@RestController
@RequestMapping("/sys/user")
public class UserController {

    private final UserService userService;

    public UserController(UserService userService) {
        this.userService = userService;
    }

    @PostMapping
    public AjaxResult addUser(@RequestBody UserInfo userInfo) {
        return userService.addUser(userInfo);
    }
}
